<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
UserBean user = (UserBean)request.getSession().getAttribute("userBean");

String _db = user.getDbType();
String orgId = request.getParameter("orgid");
String type = request.getParameter("type");
String child = request.getParameter("child");
	
//根据column判断具体条件

Map<String,List<Map<String, String>>> dicMap = user.getDicMap();
List<Map<String, String>> list = null;
String temp = "";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />
	
		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
	
		<script type="text/javascript">
			var _db = '<%=_db%>';
			var manager;//人员表格
			
			_jsonObj.classname = "com.wxtf.platform.main.sygl.sygl_tognjiAction";
			_jsonObj.methodname = "queryDetail";
			_jsonObj.logicdata = '[{\"type\":\"<%=type%>\",\"orgIds\":\"<%=orgId%>\",\"child\":\"<%=child%>\"}]';
			
			$(function(){
				manager = $("#emp-grid").ligerGrid({
					url: _url, parms: _jsonObj, width: '100%', height: '100%',
					usePager: true, rownumbers: true, checkbox: false, alternatingRow: true,
					columns: [
						{ display: '机构名称', name: 'reserve1', width:150, align:'left' },
						{ display: '姓名', name: 'tbe_name', width: 120, align: 'left'},
						{ display: '性别', name: 'tbe_sex', width: 80, align: 'left' },
						{ display: '出生日期', name: 'tbe_birthday', width: 120, align: 'left' },
						{ display: '民族', name: 'tbe_nation', width:  1, hide:true },
						{ display: '身份证号', name: 'tbe_idcard', width: 180, align: 'left' },
						{ display: '职工证号', name: 'tbe_work_permit', width: 1, hide:true},
						{ display: '用工形式', name: 'tbe_employment_forms', width: 1, hide:true},
						{ display: '婚姻状态', name: 'tbe_marital_status', width: 100, align: 'left',
							render: function(record, index, value, oth){
								<%
								list = dicMap.get("27");
								temp = "";
								if(null != list && list.size() > 0){
									for(Map<String, String> map: list){
								%>
								if(value == '<%=map.get("tmgd_id")%>'){
									<%
									temp = map.get("tmgd_name");
									%>
									return '<%=temp%>';
								}
								<%
									}
								}
								%>
								return value;
							}
						},
						{ display: '结婚时间', name: 'tbe_married_time', width: 120, align: 'left'},
						{ display: '结婚证号', name: 'tbe_marriage_certificate', width: 120, align: 'left' },

						{ display: '配偶姓名', name: 'tbfi_spouse_name', width: 120, align: 'left' },
						{ display: '配偶性别', name: 'tbfi_spouse_sex', width: 80, align: 'left' },
						{ display: '配偶身份证号', name: 'tbfi_spouse_idcard', width: 180, align: 'left' },
						{ display: '配偶出生日期', name: 'tbfi_spouse_birthday', width: 120, align: 'left' },
						{ display: '配偶是否一汽', name: 'tbfi_spouse_is_join', width: 120, align: 'left',
							render: function(record, index, value, oth){
							if(value == 1){
								return "是";
							}else{
								return "否";
							}
						} },
						{ display: '家庭子女数', name: 'tbfi_children_num', width: 100, align: 'left' },
						{ display: '男孩数', name: 'tbfi_children_mnum', width: 80, align: 'left' },
						{ display: '女孩数', name: 'tbfi_children_fnum', width: 80, align: 'left' },
						
						{ display: '是否不孕症', name: 'tbe_is_barrenness', width:  120, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否绝经', name: 'the_is_menopause', width:  80, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否晚婚', name: 'tbe_is_late_marriage', width:  80, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否晚育', name: 'tbe_is_late_birth', width:  1, hide:true },
						{ display: '员工状态', name: 'tbe_status', width:  1, hide:true },
						{ display: '生育能力状态', name: 'tbe_ba_status', width:  1, hide:true },
						{ display: '节育措施', name: 'tbe_birth_control_measures', width:  120, align: 'left',
							render: function(record, index, value, oth){
								<%
								list = dicMap.get("104");
								temp = "";
								if(null != list && list.size() > 0){
									for(Map<String, String> map: list){
								%>
								if(value == '<%=map.get("tmgd_id")%>'){
									<%
									temp = map.get("tmgd_name");
									%>
									return '<%=temp%>';
								}
								<%
									}
								}
								%>
								return value;
							}
						}


						
					]
				});
            });
            
		</script>
	</head>
  
  	<body>
  		<center><h2 style="display:block;padding:10px 0;">职工详细信息</h2></center>
	    <div id="emp-grid"></div>
	</body>
</html>
